package com.heatingcharge.entity.pay;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 支付信息表
 * </p>
 *
 * @author devin.jiang
 * @since 2019-12-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PayInfo implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 应缴ID
     */
    private Integer payableId;

    /**
     * 订单号
     */
    private String orderNo;

    /**
     * 优惠金额
     */
    private BigDecimal lateFee;

    /**
     * 优惠金额
     */
    private BigDecimal discount;

    /**
     * 附加费用
     */
    private BigDecimal additional;

    /**
     * 减免金额
     */
    private BigDecimal reduction;

    /**
     * 补贴金额
     */
    private BigDecimal subsidy;

    /**
     * 实际应缴金额
     */
    private BigDecimal actualPayable;

    /**
     * 实缴金额
     */
    private BigDecimal actual;

    /**
     * 支付平台:1-微信,2-支付宝
     */
    private Integer payPlatform;

    /**
     * 缴费状态 1：已缴费 2：欠费 3：未缴
     */
    private Integer payState;

    /**
     * 缴费日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    private String payee;

    public PayInfo(Integer payableId, String orderNo,
                   BigDecimal lateFee, BigDecimal discount, BigDecimal additional,
                   BigDecimal reduction, BigDecimal subsidy,
                   BigDecimal actualPayable, BigDecimal actual,
                   Integer payPlatform, Integer payState,
                   String payee) {
        this.payableId = payableId;
        this.orderNo = orderNo;
        this.lateFee=lateFee;
        this.discount = discount;
        this.additional = additional;
        this.reduction = reduction;
        this.subsidy = subsidy;
        this.actualPayable = actualPayable;
        this.actual = actual;
        this.payPlatform = payPlatform;
        this.payState = payState;
        this.payee = payee;
    }
}
